package com.java.core.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ReplaceUtils {
	/**
	 * 字符串替换
	 * 
	 * @param source
	 * @return
	 */
	public static String replace(String source) {
		Matcher m = Pattern.compile("@uuid\\((([^()])*)\\)").matcher(source);
		while (m.find()) {
			source = source.replace(m.group(0), IdUtils.uuid());
		}
		return source;
	}
}
